using System;
using System.Collections.Generic;
using System.Text;

using CommonTypes; // TODO : ONLY vector dependencie. remove modify 


namespace MVCFramework.Models.Filters
{
    public class Filter: IFilter 
    {

        Id<IFilter> id;

        public Id<IFilter> Id
        {
            get { return id; }
            set { id = value; }
        }
        protected IModel model;
        private static readonly LoggerAdapter log = new LoggerAdapter(typeof(Filter));

        private bool isActivated;
        public bool IsActivated
        {
            get { return isActivated; }
            set { isActivated = value; }
        }

        public IModel Model
        {
            get { return model; }
            set { model = value; }
        }

        public Filter(IModel model)
        {
            this.model = model;
        }

        public Filter()
        {
        }

        #region IFilter Members

        public virtual bool CheckAdd(object element)
        {
            log.Info("Filter " + this.ToString() + "  Check request  Addition Object :  " + element.ToString());
            return true;
        }

        public virtual bool CheckRemove(object element)
        {
            log.Info("Filter " + this.ToString() + "  Check request  Removal Object :   " + element.ToString());
            return true;
        }

        public virtual bool CheckGet(object element)
        {
            log.Info ("Filter " + this.ToString() + "  Check request To get Object :  " + element.ToString());
            return true;
        }

        public virtual bool CheckModify(object element, Vector v)
        {
            return true;
        }
        #endregion
    }
}
